home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 September & October / Amiga-CD 1996 #9-10.iso / demos / storm-c / stormc / stormc install-script english < prev    next >
Encoding:
Text File  |  1996-07-01  |  11.1 KB  |  799 lines

  1. ; $VER: StormC-Demo V1.1 Install Version 1.06e (1.7.96)
  2.  
  3. ; Installations-Script 
  4.  
  5. ; (c) 1996 HAAGE & PARTNER Computer GmbH
  6.  
  7.  
  8.  
  9. (complete 0)
  10.  
  11.  
  12.  
  13. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  14.  
  15. ; Versionen.
  16.  
  17.  
  18.  
  19. (set stcpp-version "1.1")
  20.  
  21. (set stcpp-date "(25 Jun 96)")
  22.  
  23.  
  24.  
  25. ;====================================================================
  26.  
  27. ; Initialisierungen
  28.  
  29.  
  30.  
  31.  
  32.  
  33. (set @default-dest "")
  34.  
  35.  
  36.  
  37. (set os-version (/ (getversion) 65536))
  38.  
  39. (set os-13 (< os-version 36))
  40.  
  41. (set os-20 (>= os-version 36))
  42.  
  43. (set os-21 (>= os-version 38))
  44.  
  45.  
  46.  
  47. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  48.  
  49.  
  50.  
  51. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  52.  
  53.  
  54.  
  55. ;(set run-lha                "run RAM:Lhex x -a ")
  56.  
  57. ;(set run-free                "run C/StormFree")
  58.  
  59.  
  60.  
  61. ; Die Pfadnamen der einzelnen Quell-Dateien.
  62.  
  63.  
  64.  
  65. (set #binsource             (tackon (pathonly @icon) "StormSYS"))    ; Hier stehen die Ausführbaren Programme
  66.  
  67. (set #includesource         (tackon (pathonly @icon) "INCLUDE"))     ; Hier stehen die Includes
  68.  
  69. (set #envsource            (tackon (pathonly @icon) "ENV"))            ; Die Voreinstellungen
  70.  
  71. (set #libsource            (tackon (pathonly @icon) "LIB"))            ; Hier stehen die Bibliotheken
  72.  
  73. (set #samplesource        (tackon (pathonly @icon) "Examples"))    ; Hier stehen die Demo-Sourcen
  74.  
  75. (set #manualsource        (tackon (pathonly @icon) "MANUAL"))        ; Hier steht die Dokumentation
  76.  
  77. (set #toolssource       (tackon (pathonly @icon) "TOOLS"))        ; Hier stehen die Tools
  78.  
  79. (set source-Liesmich     (tackon (pathonly @icon) "Readme"))        ; Die Liesmich Datei 
  80.  
  81. (set source-ikon        (tackon (pathonly @icon) "StormCPP.info"))    ; Das Programm-Piktogramm
  82.  
  83. (set #wizlibsource      (tackon (pathonly @icon) "LIBS/Wizard.library")) ; Die neuen Boopsi-Klassen
  84.  
  85.  
  86.  
  87. ;(set !auswahlhilfe
  88.  
  89. ;    (cat "\nAuf Ihrer Festplatte befindet sich bereits eine Version "
  90.  
  91. ;        "der Datei die installiert werden soll. \n\n"
  92.  
  93. ;        "Wählen Sie \"Ja\", wenn Sie die alte Datei mit der neuen "
  94.  
  95. ;        "überschreiben möchten. Anderenfalls waehlen Sie bitte \"Nein\"!\n"))
  96.  
  97.  
  98.  
  99. (set #prp-copy-samples
  100.  
  101.     "Copying C and C++ examples...")
  102.  
  103. (set #hlp-copy-samples
  104.  
  105.     "Use the manual and the examples to get a quick start with StormC")
  106.  
  107. (set #prp-copy-env
  108.  
  109.     "Copying the StormC default icons...")
  110.  
  111. (set #hlp-copy-env
  112.  
  113.     "The icons are used by the project management and by the editor")
  114.  
  115. (set #prp-copy-includes
  116.  
  117.     "Copying the C++ includes...")
  118.  
  119. (set #hlp-copy-includes
  120.  
  121.     "The includes are needed by the preprocessor of the compiler")
  122.  
  123. (set #prp-copy-libs
  124.  
  125.     "Copying the linker libraries...")
  126.  
  127. (set #hlp-copy-libs
  128.  
  129.     "These libraries are used by the linker")
  130.  
  131. (set #prp-copy-manual
  132.  
  133.     "Copying the documentation...")
  134.  
  135. (set #hlp-copy-manual
  136.  
  137.     "This is an Amiga Guide file for StormC")
  138.  
  139. (set #prp-copy-bin
  140.  
  141.     "Copying the executables of StormC...")
  142.  
  143. (set #hlp-copy-bin
  144.  
  145.     "If this is your first time insatallation of StormC, you should copy everything!")
  146.  
  147. (set #prp-copy-tools
  148.  
  149.     "Copying the Screentool...")
  150.  
  151. (set #hlp-copy-tools
  152.     "This is an Screenmanager-Commodity for StormC")
  153.  
  154. (set #prp-copy-lib
  155.     "Copying the WIZARD-LIBRARY\n")
  156. (set #hlp-copy-lib
  157.     "This is the Boopsi Class Library from StormWizard!")
  158.  
  159. ; Die Dateigrößen
  160.  
  161. (set size-stormcpp            24000)
  162. (set size-stormc                432000)
  163. (set size-stormed                200000)
  164. (set size-stormshell              330000)
  165. (set size-stormrun            220000)
  166. (set size-stormasm            36000)
  167. (set size-stormpics            50000)
  168. (set size-stormlex            50000)
  169. (set size-libs                    350000)
  170. (set size-inlcudes            400000)
  171. (set size-demos                100000)
  172.  
  173.  
  174. (set size-komplett    ( + size-stormrun size-stormasm size-stormcpp size-stormc size-stormed size-stormshell size-stormpics size-stormlex size-libs size-inlcudes size-demos))
  175.  
  176.  
  177.  
  178. ; ----------------------------- Prozeduren ------------------------------
  179.  
  180.  
  181.  
  182. (Procedure Make_Folder
  183.  
  184.     (
  185.  
  186.     (set folder (tackon folder "StormC"))
  187.  
  188.     (if (= (exists folder) 0)
  189.  
  190.        (
  191.  
  192.        (makedir folder (infos))
  193.  
  194.        )
  195.  
  196.     ))
  197.  
  198. )
  199.  
  200.  
  201.  
  202. ;=====================================================================================
  203.  
  204. ; Beginn der Installation
  205.  
  206. ;=====================================================================================
  207.  
  208.  
  209.  
  210. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  211.  
  212.  
  213.  
  214. (set act-user-level @user-level)
  215.  
  216. (user 1)
  217.  
  218.  
  219.  
  220. (message (cat    "\nWelcome to the installation of the \n\n\"StormC demo "
  221.  
  222.                      stcpp-version " of the "stcpp-date "\"!\n\n"
  223.  
  224.                     "This script copies the files needed by StormC "
  225.  
  226.                     "to your harddisk.\n"))
  227.  
  228.  
  229.  
  230. (user act-user-level)
  231.  
  232. (welcome)
  233.  
  234.  
  235.  
  236. (complete 5)
  237.  
  238.  
  239.  
  240. (set act-user-level @user-level)
  241.  
  242. (user 1)
  243.  
  244.  
  245.  
  246.  
  247.  
  248. ;    Alte Version pruefen und entsprechende Warnung ausgeben! **************************************************************
  249.  
  250.  
  251.  
  252. (set folder "WORK:StormC")
  253.  
  254.  
  255.  
  256. (if (exists "StormC:" (noreq))
  257.  
  258.     (
  259.  
  260.         (message (cat    "\nThere is already and installation of StormC\n"
  261.  
  262.                         "on your harddisk! Please select the parent\n"
  263.  
  264.                         "directory or the volume if you want to update\n"
  265.  
  266.                         "your old StormC installation!"))
  267.  
  268.  
  269.  
  270.     (set folder (getassign "STORMC"))
  271.  
  272.     )
  273.  
  274. )
  275.  
  276.  
  277.  
  278. (set cmpstr (getassign "STORMC"))
  279.  
  280.  
  281.  
  282. (user act-user-level)
  283.  
  284.  
  285.  
  286. (if (= @user-level 0)
  287.  
  288.     (
  289.  
  290.     (user 1)
  291.  
  292.     (message (cat    "The ENTRY mode needs a minimum of 5 MB of free harddisk space."
  293.  
  294.                         "Please select a drawer/volume for your StormC installation"
  295.  
  296.                         "\n\n"
  297.  
  298.                         "All other settings will be done by the installation "
  299.  
  300.                         "script to fit your system."))))
  301.  
  302.  
  303.  
  304. (set ok 0)
  305.  
  306. (while (not ok)
  307.  
  308.     (set folder
  309.  
  310.         (askdir
  311.  
  312.             (prompt (cat "\n"
  313.  
  314.                              "Select a path for your StormC installation.\n"
  315.  
  316.                              "A drawer named StormC will be created!"))
  317.  
  318.             (help (cat    "    You will get an overview of all volumes with 'Show drives' "
  319.  
  320.                             "Form this list you should select the first, non colored, items. "
  321.  
  322.                             "only\n"
  323.  
  324.                             "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  325.  
  326.                             "do not use such names as \"DF0:\", \"DF1:\", "
  327.  
  328.                             "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  329.  
  330.                             "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  331.  
  332.                             "\n\n"
  333.  
  334.                             "The Storm C installation can not be placed on a volume directly. "
  335.  
  336.                             "You have to select a drawer. Ohterwise an error will be shown. "
  337.  
  338.                             "\n\n"
  339.  
  340.                             @askdir-help))
  341.  
  342.             (default folder)
  343.  
  344.             (disk)
  345.  
  346.         )
  347.  
  348.     )
  349.  
  350.  
  351.  
  352.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  353.  
  354.  
  355.  
  356.     ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  357.  
  358.     ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  359.  
  360.     ; kann die Auswahl-Schleife beendet werden.
  361.  
  362.     (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  363.  
  364.         (message (cat    "\nYour selection \"" folder "\" is not a valid "
  365.  
  366.                             "drawer !\n\n"
  367.  
  368.                             "Use 'Show drives' to get a list of all volumes. "
  369.  
  370.                             " Form this list you should only select the first, non color, items. "
  371.  
  372.                             "\n"
  373.  
  374.                             "Use \"New drawer...\" to create a new drawer on the current "
  375.  
  376.                                "volume."))
  377.  
  378.         ;else
  379.  
  380.         (
  381.  
  382.             (set freediskspace (getdiskspace folder))    ; Der freie Speicher auf diesem Medium
  383.  
  384.  
  385.  
  386.             (if (< freediskspace size-komplett)
  387.  
  388.                 (
  389.  
  390.                 (user 1)
  391.  
  392.                 (message (cat    "\nThe is not enough free space on the volume you "
  393.  
  394.                                             "selected for the complete installation of StormC. "
  395.  
  396.                                             "\n\n"
  397.  
  398.                                             "Free diskspace " freediskspace "!\n"
  399.  
  400.                                             "diskspace needed " size-komplett "!\n\n"
  401.  
  402.                                             "Please select another volume !"))                
  403.  
  404.                 )
  405.  
  406.             ;else
  407.  
  408.             (set ok 1)
  409.  
  410.             )
  411.  
  412.         )
  413.  
  414.     )
  415.  
  416. )
  417.  
  418.  
  419.  
  420. (makeassign "STORMC")
  421.  
  422.  
  423.  
  424. (user act-user-level)
  425.  
  426.  
  427.  
  428. (set @default-dest folder)    ; Die Zuweisung ist sehr wichtig!
  429.  
  430.  
  431.  
  432. (set destbin    (tackon folder "StormSYS"))
  433.  
  434. (if                                          ; Compiler-Verzeichnis erzeugen
  435.  
  436.     (= (exists destbin) 0)
  437.  
  438.     (makedir destbin (infos))
  439.  
  440. )
  441.  
  442.  
  443.  
  444. (set destdemo    (tackon folder "Examples"))
  445.  
  446. (if                                          ; Demo-Verzeichnis erzeugen
  447.  
  448.     (= (exists destdemo) 0)
  449.  
  450.     (makedir destdemo (infos))
  451.  
  452. )
  453.  
  454. (set destinclude (tackon folder "Include"))
  455.  
  456. (if                                          ; Includes-Verzeichnis erzeugen
  457.  
  458.     (= (exists destinclude) 0)
  459.  
  460.     (makedir destinclude)
  461.  
  462. )
  463.  
  464.  
  465.  
  466. (set destlib    (tackon folder "Lib"))
  467.  
  468. (if                                          ; Libraries-Verzeichnis erzeugen
  469.  
  470.     (= (exists destlib) 0)
  471.  
  472.     (makedir destlib)
  473.  
  474. )
  475.  
  476.  
  477.  
  478. (set destmanual    (tackon folder "Manual"))
  479.  
  480. (if                                          ; Dokumentations-Verzeichnis erzeugen
  481.  
  482.     (= (exists destmanual) 0)
  483.  
  484.     (makedir destmanual (infos))
  485.  
  486. )
  487.  
  488. (set desttools    (tackon folder "Tools"))
  489.  
  490. (if                                          ; Tools-Verzeichnis erzeugen
  491.  
  492.     (= (exists desttools) 0)
  493.  
  494.     (makedir desttools (infos))
  495.  
  496. )
  497.  
  498.  
  499.  
  500. (complete 5)
  501.  
  502.  
  503.  
  504. ; Liesmich Datei auf Festplatte kopieren!
  505.  
  506.  
  507.  
  508. (copyfiles
  509.  
  510.     (source source-Liesmich)
  511.  
  512.     (dest folder)
  513.  
  514.     (infos)
  515.  
  516. )
  517.  
  518.  
  519.  
  520. (complete 8)
  521.  
  522.  
  523.  
  524. (set morerunpath "run C/More Readme")
  525.  
  526.  
  527.  
  528. (run morerunpath)    ; Liesmich laden
  529.  
  530.  
  531.  
  532. (complete 10)
  533.  
  534.  
  535.  
  536. (set destinfo    (tackon folder "StormCPP.info"))
  537.  
  538. (if                                          ; Projekt-Ikon erzeugen
  539.     (= (exists destinfo) 0)
  540.     (
  541.     (copyfiles
  542.         (source source-ikon)
  543.         (dest folder)
  544.     ))
  545. )
  546.  
  547.  
  548.  
  549. (complete 15)
  550.  
  551.  
  552.  
  553. (copyfiles                                            ; Beispiele kopieren
  554.  
  555.     (prompt #prp-copy-samples)
  556.  
  557.     (help #hlp-copy-samples)
  558.  
  559.     (source #samplesource)
  560.  
  561.     (dest destdemo)
  562.  
  563.     (all)
  564.  
  565.     (confirm)
  566.  
  567. )
  568.  
  569.  
  570.  
  571. (complete 20)
  572.  
  573.  
  574.  
  575. (copyfiles                                            ; Settings kopieren
  576.  
  577.     (prompt #prp-copy-env)
  578.  
  579.     (help #hlp-copy-env)
  580.  
  581.     (source #envsource)
  582.  
  583.     (dest "ENVARC:")
  584.  
  585.     (all)
  586.  
  587.     (confirm)
  588.  
  589. )
  590.  
  591.  
  592.  
  593. (complete 22)
  594.  
  595.  
  596.  
  597. (copyfiles                                            ; Settings kopieren
  598.  
  599.     (prompt #prp-copy-env)
  600.  
  601.     (help #hlp-copy-env)
  602.  
  603.     (source #envsource)
  604.  
  605.     (dest "ENV:")
  606.  
  607.     (all)
  608.  
  609.     (confirm)
  610.  
  611. )
  612.  
  613.  
  614.  
  615. (complete 25)
  616.  
  617.  
  618.  
  619. (copyfiles                                            ; Compiler kopieren
  620.  
  621.     (prompt #prp-copy-bin)
  622.  
  623.     (help #hlp-copy-bin)
  624.  
  625.     (source #binsource)
  626.  
  627.     (dest destbin)
  628.  
  629.     (all)
  630.  
  631.     (confirm)
  632.  
  633. )
  634.  
  635.  
  636.  
  637. (complete 40)
  638.  
  639.  
  640.  
  641. (copyfiles                                            ; Includes kopieren
  642.  
  643.     (prompt #prp-copy-includes)
  644.  
  645.     (help #hlp-copy-includes)
  646.  
  647.     (source #includesource)
  648.  
  649.     (dest destinclude)
  650.  
  651.     (all)
  652.  
  653.     (confirm)
  654.  
  655. )
  656.  
  657.  
  658.  
  659. (complete 60)
  660.  
  661.  
  662.  
  663. (copyfiles                                            ; Libs kopieren
  664.  
  665.     (prompt #prp-copy-libs)
  666.  
  667.     (help #hlp-copy-libs)
  668.  
  669.     (source #libsource)
  670.  
  671.     (dest destlib)
  672.  
  673.     (all)
  674.  
  675.     (confirm)
  676.  
  677. )
  678.  
  679.  
  680.  
  681. (complete 80)
  682.  
  683.  
  684.  
  685. (copyfiles                                            ; Manual kopieren
  686.  
  687.     (prompt #prp-copy-manual)
  688.  
  689.     (help #hlp-copy-manual)
  690.  
  691.     (source #manualsource)
  692.  
  693.     (dest destmanual)
  694.  
  695.     (all)
  696.  
  697.     (confirm)
  698.  
  699. )
  700.  
  701. (complete 90)
  702.  
  703.  
  704.  
  705. (copyfiles                                            ; Tools kopieren
  706.  
  707.     (prompt #prp-copy-tools)
  708.  
  709.     (help #hlp-copy-tools)
  710.  
  711.     (source #toolssource)
  712.  
  713.     (dest desttools)
  714.  
  715.     (all)
  716.  
  717.     (confirm)
  718.  
  719. )
  720.  
  721. (complete 92)
  722.  
  723. (copylib                                            ; Wizard.Library kopieren
  724.     (prompt #prp-copy-lib)
  725.     (help #hlp-copy-lib)
  726.     (source #wizlibsource)
  727.     (dest "LIBS:")
  728.     (confirm)
  729. )
  730.  
  731. (complete 95)
  732.  
  733.  
  734.  
  735.  
  736.  
  737. ; ------- STARTUP ÄNDERN
  738.  
  739.  
  740.  
  741. (set command1 (cat  "ASSIGN STORMC: " folder ""))
  742.  
  743.  
  744.  
  745. (set command1.txt
  746.  
  747.     (cat 
  748.  
  749.          "\n\n\nThere User-Startup must be changed to get StromC "
  750.  
  751.       "work right.\n\n"
  752.  
  753.          command1
  754.  
  755.     )
  756.  
  757. )
  758.  
  759.  
  760.  
  761. (startup "StormC"
  762.  
  763.     (prompt command1.txt)
  764.  
  765.     (help #help-startup)
  766.  
  767.     (command command1)
  768.  
  769. )
  770.  
  771.  
  772.  
  773. (makeassign "STORMC")
  774.  
  775. (makeassign "STORMC" folder)
  776.  
  777. (delete "RAM:LHex")
  778.  
  779. (complete 100)
  780.  
  781.  
  782.  
  783. ; ------- FERTIG
  784.  
  785.  
  786.  
  787. (message (cat 
  788.  
  789.     "\nInstallation of StormC is done.\n"
  790.  
  791.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  792.  
  793.    "User-Startup, please do it by your own.\n\n"
  794.  
  795.    "\n\nBest wishes ... ")
  796.  
  797. )
  798.  
  799.